@import "./constConfig.less";

@content-color: rgba(0, 0, 0, 0.65);

.m_notification_panel {
  position: fixed;
  right: 0;
  top: 0;
  padding: 40px 20px 0 0;
  box-sizing: border-box;
  z-index: 99999;
}
.m_notification {
  width: 384px;
  position: relative;
  border: none;
  border-radius: 4px;
  background-color: @default-background-color;
  overflow: hidden;
  padding: 16px 24px;
  box-sizing: border-box;
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
    0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
  animation: m_notification_join 0.3s;
  .m_notification_header {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 10px;
    .m_notification_title {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: @default-color;
      line-height: 24px;
    }
    .m_notification_btn_close {
      font-size: 12px;
      outline: none;
      cursor: pointer;
      border: none;
      background-color: transparent;
      box-sizing: border-box;
      margin-left: 10px;
      color: @default-color;
    }
    .m_notification_btn_close:hover {
      color: @default-color-hover;
    }
  }
  .m_notification_content {
    word-break: break-all;
    word-wrap: break-word;
    color: @content-color;
    font-size: 12px;
  }
}
.m_notification.out {
  animation: m_notification_out 0.3s;
}
.m_notification.m_notification_info .m_notification_header {
  .m_notification_title::before {
    font-family: "Micon" !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    content: "\e602";
    margin-right: 5px;
    color: @info-icon-color;
  }
}
.m_notification.m_notification_success .m_notification_header {
  .m_notification_title::before {
    font-family: "Micon" !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    content: "\e62a";
    margin-right: 5px;
    color: @success-icon-color;
  }
}
.m_notification.m_notification_warning .m_notification_header {
  .m_notification_title::before {
    font-family: "Micon" !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    content: "\e602";
    margin-right: 5px;
    color: @warning-icon-color;
  }
}
.m_notification.m_notification_error .m_notification_header {
  .m_notification_title::before {
    font-family: "Micon" !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    content: "\e605";
    margin-right: 5px;
    color: @error-icon-color;
  }
}

@keyframes m_notification_join {
  from {
    right: -100%;
  }
  to {
    right: 0;
  }
}

@keyframes m_notification_out {
  from {
    right: 0;
  }
  to {
    right: -100%;
  }
}
